#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <math.h>
#define DEFINITNOD 1
#include "funct.h"

class Nod
{/*nodul din arborele expresiei functiei*/
    protected:
        Nod *fStang, *fDrept;/*fii stang si drept*/
        static long double x;/*valoarea punctului in care se face calculul expresiei*/
    public:
        Nod();
        ~Nod();

        /*metodele virtuale*/
        virtual long double calcul() = 0;
        virtual char *derivare() = 0;
        virtual long double calculDerivata() = 0;
        virtual char *toString() = 0;

        Nod *getFStang();
        void setFStang(Nod *x);
        Nod *getFDrept();
        void setFDrept(Nod *x);

        static void setX(long double X);
        static long double getX();
};
